/*
 * 商品模块
 */

// 商品列表
export function fetchList() {
  const data = {
    "code": 200,
    "msg": null,
    "data": {
      "pageNum": 1,
      "pageSize": 5,
      "totalPage": 3,
      "total": 11,
      "list": [{
        "id": 26,
        "brandId": 3,
        "goodsCategoryId": 19,
        "feightTemplateId": 0,
        "goodsAttributeCategoryId": 3,
        "name": "华为 HUAWEI P20 ",
        "pic": "http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180607/5ac1bf58Ndefaac16.jpg",
        "goodsSn": "6946605",
        "deleteStatus": 0,
        "publishStatus": 1,
        "newStatus": 1,
        "recommandStatus": 1,
        "verifyStatus": 0,
        "sort": 100,
        "sale": 0,
        "price": 3788.00,
        "promotionPrice": null,
        "giftGrowth": 3788,
        "giftPoint": 3788,
        "usePointLimit": 0,
        "subTitle": "AI智慧全面屏 6GB +64GB 亮黑色 全网通版 移动联通电信4G手机 双卡双待手机 双卡双待",
        "originalPrice": 4288.00,
        "stock": 1000,
        "lowStock": 0,
        "unit": "件",
        "weight": 0.00,
        "previewStatus": 1,
        "serviceIds": "2,3,1",
        "keywords": "",
        "note": "",
        "albumPics": "http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180607/5ab46a3cN616bdc41.jpg,http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180607/5ac1bf5fN2522b9dc.jpg",
        "detailTitle": "",
        "promotionStartTime": null,
        "promotionEndTime": null,
        "promotionPerLimit": 0,
        "promotionType": 1,
        "brandName": "华为",
        "goodsCategoryName": "手机数码",
        "description": null,
        "detailDesc": null,
        "detailHtml": null,
        "detailMobileHtml": null
      }, {
        "id": 27,
        "brandId": 6,
        "goodsCategoryId": 19,
        "feightTemplateId": 0,
        "goodsAttributeCategoryId": 3,
        "name": "小米8 全面屏游戏智能手机 6GB+64GB 黑色 全网通4G 双卡双待",
        "pic": "http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180615/xiaomi.jpg",
        "goodsSn": "7437788",
        "deleteStatus": 0,
        "publishStatus": 1,
        "newStatus": 1,
        "recommandStatus": 1,
        "verifyStatus": 0,
        "sort": 0,
        "sale": 0,
        "price": 2699.00,
        "promotionPrice": null,
        "giftGrowth": 2699,
        "giftPoint": 2699,
        "usePointLimit": 0,
        "subTitle": "骁龙845处理器，红外人脸解锁，AI变焦双摄，AI语音助手小米6X低至1299，点击抢购",
        "originalPrice": 2699.00,
        "stock": 100,
        "lowStock": 0,
        "unit": "",
        "weight": 0.00,
        "previewStatus": 0,
        "serviceIds": "",
        "keywords": "",
        "note": "",
        "albumPics": "",
        "detailTitle": "",
        "promotionStartTime": null,
        "promotionEndTime": null,
        "promotionPerLimit": 0,
        "promotionType": 3,
        "brandName": "小米",
        "goodsCategoryName": "手机数码",
        "description": null,
        "detailDesc": null,
        "detailHtml": null,
        "detailMobileHtml": null
      }, {
        "id": 28,
        "brandId": 6,
        "goodsCategoryId": 19,
        "feightTemplateId": 0,
        "goodsAttributeCategoryId": 3,
        "name": "小米 红米5A 全网通版 3GB+32GB 香槟金 移动联通电信4G手机 双卡双待",
        "pic": "http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180615/5a9d248cN071f4959.jpg",
        "goodsSn": "7437789",
        "deleteStatus": 0,
        "publishStatus": 1,
        "newStatus": 1,
        "recommandStatus": 1,
        "verifyStatus": 0,
        "sort": 0,
        "sale": 0,
        "price": 649.00,
        "promotionPrice": null,
        "giftGrowth": 649,
        "giftPoint": 649,
        "usePointLimit": 0,
        "subTitle": "8天超长待机，137g轻巧机身，高通骁龙处理器小米6X低至1299，点击抢购",
        "originalPrice": 649.00,
        "stock": 100,
        "lowStock": 0,
        "unit": "",
        "weight": 0.00,
        "previewStatus": 0,
        "serviceIds": "",
        "keywords": "",
        "note": "",
        "albumPics": "",
        "detailTitle": "",
        "promotionStartTime": null,
        "promotionEndTime": null,
        "promotionPerLimit": 0,
        "promotionType": 4,
        "brandName": "小米",
        "goodsCategoryName": "手机数码",
        "description": null,
        "detailDesc": null,
        "detailHtml": null,
        "detailMobileHtml": null
      }, {
        "id": 29,
        "brandId": 51,
        "goodsCategoryId": 19,
        "feightTemplateId": 0,
        "goodsAttributeCategoryId": 3,
        "name": "Apple iPhone 8 Plus 64GB 红色特别版 移动联通电信4G手机",
        "pic": "http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180615/5acc5248N6a5f81cd.jpg",
        "goodsSn": "7437799",
        "deleteStatus": 0,
        "publishStatus": 1,
        "newStatus": 1,
        "recommandStatus": 1,
        "verifyStatus": 0,
        "sort": 0,
        "sale": 0,
        "price": 5499.00,
        "promotionPrice": null,
        "giftGrowth": 5499,
        "giftPoint": 5499,
        "usePointLimit": 0,
        "subTitle": "【限时限量抢购】Apple产品年中狂欢节，好物尽享，美在智慧！速来 >> 勾选[保障服务][原厂保2年]，获得AppleCare+全方位服务计划，原厂延保售后无忧。",
        "originalPrice": 5499.00,
        "stock": 100,
        "lowStock": 0,
        "unit": "",
        "weight": 0.00,
        "previewStatus": 0,
        "serviceIds": "",
        "keywords": "",
        "note": "",
        "albumPics": "",
        "detailTitle": "",
        "promotionStartTime": null,
        "promotionEndTime": null,
        "promotionPerLimit": 0,
        "promotionType": 0,
        "brandName": "苹果",
        "goodsCategoryName": "手机数码",
        "description": null,
        "detailDesc": null,
        "detailHtml": null,
        "detailMobileHtml": null
      }, {
        "id": 30,
        "brandId": 50,
        "goodsCategoryId": 8,
        "feightTemplateId": 0,
        "goodsAttributeCategoryId": 1,
        "name": "HLA海澜之家简约动物印花短袖T恤",
        "pic": "http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180615/5ad83a4fN6ff67ecd.jpg!cc_350x449.jpg",
        "goodsSn": "HNTBJ2E042A",
        "deleteStatus": 0,
        "publishStatus": 1,
        "newStatus": 1,
        "recommandStatus": 1,
        "verifyStatus": 0,
        "sort": 0,
        "sale": 0,
        "price": 98.00,
        "promotionPrice": null,
        "giftGrowth": 0,
        "giftPoint": 0,
        "usePointLimit": 0,
        "subTitle": "2018夏季新品微弹舒适新款短T男生 6月6日-6月20日，满300减30，参与互动赢百元礼券，立即分享赢大奖",
        "originalPrice": 98.00,
        "stock": 100,
        "lowStock": 0,
        "unit": "",
        "weight": 0.00,
        "previewStatus": 0,
        "serviceIds": "",
        "keywords": "",
        "note": "",
        "albumPics": "",
        "detailTitle": "",
        "promotionStartTime": null,
        "promotionEndTime": null,
        "promotionPerLimit": 0,
        "promotionType": 0,
        "brandName": "海澜之家",
        "goodsCategoryName": "T恤",
        "description": null,
        "detailDesc": null,
        "detailHtml": null,
        "detailMobileHtml": null
      }]
    }
  }

  return {
    url: 'products/fetchList',
    type: 'post',
    data: data
  }
}


// 删除状态
export function updateDeleteStatus() {
  const data = {
    "code": 200,
    "msg": '删除成功',
    "data": {}
  }
  return {
    url: 'products/updateDeleteStatus',
    type: 'get',
    data: data
  }
}

// 设为新品
export function updateNewStatus() {
  const data = {
    "code": 200,
    "msg": '成功',
    "data": {}
  }
  return {
    url: 'products/updateNewStatus',
    type: 'get',
    data: data
  }
}
// 设为推荐
export function updateRecommendStatus() {
  const data = {
    "code": 200,
    "msg": '成功',
    "data": {}
  }
  return {
    url: 'products/updateRecommendStatus',
    type: 'get',
    data: data
  }
}
// 设为上架
export function updatePublishStatus() {
  const data = {
    "code": 200,
    "msg": '成功',
    "data": {}
  }
  return {
    url: 'products/updatePublishStatus',
    type: 'get',
    data: data
  }
}
